home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / emacs16d.zip / MOUSE.MIN < prev    next >
Text File  |  1991-09-04  |  13KB  |  618 lines

  1.  
  2.  
  3. Name:Pfilename
  4. Text Region
  5. ---- ------
  6. mouse-drag-move-point: (left text) 
  7.   Move point to mouse cursor, and allow dragging.
  8. mouse-drag-set-mark-stuff: (left up text) 
  9.   The up click handler that goes with mouse-drag-move-point.
  10. mouse-exch-pt-and-mark: (left shift text) (left double text) 
  11.   Exchange point and mark.
  12. mouse-set-mark-and-stuff: (middle text) 
  13.   Set mark at mouse cursor, and put region in stuff buffer.
  14. emacs-menu-eval: (right text) 
  15.   Pop-up menu of editor commands.
  16. (sun-yank-selection): (right shift text) (right double text) 
  17.   Set mark and yank the contents of the current sunwindows selection
  18. mouse-save/delete/yank: (middle shift text) (middle double text) 
  19.   Context sensitive save/delete/yank.
  20. mouse-save-thing-there: (middle control text) 
  21.   Put thing at mouse in kill ring, leave point as is.
  22. mouse-kill-thing-there: (right control text) 
  23.   Kill thing at mouse, leave point where it was.
  24. mouse-yank-at-point: (left control text) 
  25.   Yank from kill-ring at point; then cycle thru kill ring.
  26. mouse-copy-thing: (left middle control text) 
  27.   Put thing at mouse in kill ring, yank to point.
  28. mouse-move-thing: (left right control text) 
  29.   Kill thing at mouse, yank it to point.
  30. mouse-mark-thing: (middle right control text) 
  31.   Set point and mark to text object using syntax table.
  32. mouse-help-region: (right shift control meta text) (right control meta double text) 
  33.   Displays a menu of mouse functions callable in this region.
  34. mouse-line-to-top: (left meta text) 
  35.   Scrolls the line at the mouse cursor up to the top.
  36. mouse-line-to-bottom: (left shift meta text) (left meta double text) 
  37.   Scrolls the line at the mouse cursor to the bottom.
  38. mouse-line-to-middle: (middle meta text) 
  39.   Scrolls the line at the mouse cursor to the middle.
  40. mouse-middle-to-line: (middle shift meta text) (middle meta double text) 
  41.   Scrolls the line at the middle to the mouse cursor.
  42. mouse-split-vertically: (middle control meta text) 
  43.   Split the window vertically at the mouse cursor.
  44. mouse-top-to-line: (right meta text) 
  45.   Scrolls the top line down to the mouse cursor.
  46. mouse-bottom-to-line: (right shift meta text) (right meta double text) 
  47.   Scrolls the bottom line up to the mouse cursor.
  48. mouse-call-kbd-macro: (left control meta text) 
  49.   Invokes last keyboard macro at mouse cursor.
  50. mouse-undo: (right control meta text) 
  51.   Invokes undo in the window mouse is in.
  52.  
  53. Modeline Region
  54. -------- ------
  55. mouse-scroll-up: (left modeline) 
  56.   Scrolls the window upward.
  57. mouse-scroll-proportional: (middle modeline) 
  58.   Scrolls the window proportionally corresponding to window
  59. mouse-split-horizontally: (middle control modeline) 
  60.   Splits the window horizontally at mouse cursor.
  61. mouse-scroll-down: (right modeline) 
  62.   Scrolls the window downward.
  63. mouse-delete-other-windows: (left control modeline) 
  64.   Deletes all windows except the one mouse is in.
  65. mouse-delete-window: (right control modeline) 
  66.   Deletes the window mouse is in.
  67. mouse-select-window: (left meta modeline) (middle meta modeline) (right meta modeline) (left right control modeline) (left right modeline) 
  68.   Selects the window, restoring point.
  69. mouse-help-region: (right shift control meta modeline) (right control meta double modeline) 
  70.   Displays a menu of mouse functions callable in this region.
  71.  
  72. Scrollbar Region
  73. --------- ------
  74. mouse-line-to-top: (left scrollbar) (left meta scrollbar) 
  75.   Scrolls the line at the mouse cursor up to the top.
  76. mouse-line-to-bottom: (left shift scrollbar) (left double scrollbar) (left shift meta scrollbar) (left meta double scrollbar) 
  77.   Scrolls the line at the mouse cursor to the bottom.
  78. mouse-line-to-middle: (middle scrollbar) (middle meta scrollbar) 
  79.   Scrolls the line at the mouse cursor to the middle.
  80. mouse-middle-to-line: (middle shift scrollbar) (middle double scrollbar) (middle shift meta scrollbar) (middle meta double scrollbar) 
  81.   Scrolls the line at the middle to the mouse cursor.
  82. mouse-split-vertically: (middle control scrollbar) (middle control meta scrollbar) 
  83.   Split the window vertically at the mouse cursor.
  84. mouse-top-to-line: (right scrollbar) (right meta scrollbar) 
  85.   Scrolls the top line down to the mouse cursor.
  86. mouse-bottom-to-line: (right shift scrollbar) (right double scrollbar) (right shift meta scrollbar) (right meta double scrollbar) 
  87.   Scrolls the bottom line up to the mouse cursor.
  88. mouse-help-region: (right shift control meta scrollbar) (right control meta double scrollbar) 
  89.   Displays a menu of mouse functions callable in this region.
  90. [*]mouse[*]
  91.  
  92.  
  93. Name:P&setdown
  94. [*]#(sv,ts,##(top-scroll)
  95. #(sv,bs,##(bot-scroll))
  96. [*]
  97.  
  98.  
  99. Name:P&setup
  100. [*]#(ds,top-scroll,##(lv,ts))
  101. #(ds,bot-scroll,##(lv,bs))
  102. #(sv,ts,0)
  103. #(sv,bs,0)
  104. [*]
  105.  
  106.  
  107. Name:P-double-wait
  108. [*]50[*]
  109.  
  110.  
  111. Name:P.modeline-C-Left Down
  112. [*]P:mouse-delete-other-windows[*]
  113.  
  114.  
  115. Name:P.modeline-C-Right Down
  116. [*]P:mouse-delete-window[*]
  117.  
  118.  
  119. Name:P.modeline-Left Down
  120. [*]P:mouse-scroll-up[*]
  121.  
  122.  
  123. Name:P.modeline-M-C-S-Right Down
  124. [*]P:mouse-help-region[*]
  125.  
  126.  
  127. Name:P.modeline-M-Left Down
  128. [*]P:mouse-select-window[*]
  129.  
  130.  
  131. Name:P.modeline-Right Down
  132. [*]P:mouse-scroll-down[*]
  133.  
  134.  
  135. Name:P.modeline-S-Left Down
  136. [*]P:mouse-exch-pt-and-mark[*]
  137.  
  138.  
  139. Name:P.scrollbar-C-Middle Down
  140. [*]P:mouse-split-vertically[*]
  141.  
  142.  
  143. Name:P.scrollbar-Left Down
  144. [*]P:mouse-line-to-top[*]
  145.  
  146.  
  147. Name:P.scrollbar-M-C-S-Right Down
  148. [*]P:mouse-help-region[*]
  149.  
  150.  
  151. Name:P.scrollbar-Middle Down
  152. [*]P:mouse-line-to-middle[*]
  153.  
  154.  
  155. Name:P.scrollbar-S-Left Down
  156. [*]P:mouse-line-to-bottom[*]
  157.  
  158.  
  159. Name:P.text-C-Left Down
  160. [*]P:staydown[*]
  161.  
  162.  
  163. Name:P.text-C-Right Down
  164. [*]P:staydown[*]
  165.  
  166.  
  167. Name:P.text-Left Down
  168. [*]P:staydown[*]
  169.  
  170.  
  171. Name:P.text-M-C-Middle Down
  172. [*]P:mouse-split-vertically[*]
  173.  
  174.  
  175. Name:P.text-M-C-S-Right Down
  176. [*]P:mouse-help-region[*]
  177.  
  178.  
  179. Name:P.text-M-Left Down
  180. [*]P:mouse-line-to-top[*]
  181.  
  182.  
  183. Name:P.text-M-Middle Down
  184. [*]P:mouse-line-to-middle[*]
  185.  
  186.  
  187. Name:P.text-M-S-Left Down
  188. [*]P:mouse-line-to-bottom[*]
  189.  
  190.  
  191. Name:P.text-Right Down
  192. [*]P:staydown[*]
  193.  
  194.  
  195. Name:P.text-S-Left Down
  196. [*]P:staydown[*]
  197.  
  198.  
  199. Name:P:mouse-delete-other-windows
  200. Deletes all windows except the one mouse is in.
  201. [*]#(Pgoto-mouse-window)
  202. #(F:one-window)[*]
  203.  
  204.  
  205. Name:P:mouse-delete-window
  206. Deletes the window mouse is in.
  207. [*]#(Pgoto-mouse-window)
  208. #(F:one-window,-)[*]
  209.  
  210.  
  211. Name:P:mouse-exch-pt-and-mark
  212. Exchange point and mark.
  213. [*]#(F:swap-point-and-mark)[*]
  214.  
  215.  
  216. Name:P:mouse-help-region
  217. [*]#(Pmouse-help,#(Pmodeline,modeline,text,scrollbar))[*]
  218.  
  219.  
  220. Name:P:mouse-line-to-bottom
  221. [*]#(sv,cl,#(Fsecond,#(pp)))
  222. #(sv,rs,##(lv,bl))[*]
  223.  
  224.  
  225. Name:P:mouse-line-to-middle
  226. [*]#(sv,cl,#(Fsecond,#(pp)))
  227. #(sv,rs,#(//,##(lv,bl),2))[*]
  228.  
  229.  
  230. Name:P:mouse-line-to-top
  231. [*]#(sv,cl,#(Fsecond,#(pp)))
  232. #(sv,rs,1)[*]
  233.  
  234.  
  235. Name:P:mouse-pick
  236. This is the "main" function called when the middle button is pressed
  237. [*]
  238. #(ds,mouse-x,#(pp))
  239. #(Fcase,#(Pchar-under-mouse),
  240.     (123,(
  241.         #(Ppick-match,{,})
  242.     )),
  243.     (40,(
  244.         #(Ppick-match,(##(bc,40,d,a)),(##(bc,41,d,a)))
  245.     )),
  246.     (91,(
  247.         #(Ppick-match,[,])
  248.     )),
  249.     (
  250.         #(==,##(gs,mouse-x),1,(
  251.             #(Ppick-to-end-of-line)
  252.         ),(
  253.             #(P:pick-word)
  254.         ))
  255.     )
  256. )
  257. [*]
  258.  
  259.  
  260. Name:P:mouse-scroll-down
  261. [*]#(Fscroll-up-down,-1)
  262. #(rd)
  263. #(==,##(it,0),Timeout,(
  264.     #(SELF)
  265. ))
  266. [*]
  267.  
  268.  
  269. Name:P:mouse-scroll-up
  270. [*]#(Fscroll-up-down,1)
  271. #(rd)
  272. #(==,##(it,0),Timeout,(
  273.     #(SELF)
  274. ))
  275. [*]
  276.  
  277.  
  278. Name:P:mouse-split-vertically
  279. [*][*]
  280.  
  281.  
  282. Name:P:pick-word
  283. Copy the word the mouse is on to the point.
  284. [*]
  285. #(Pinsert-with-mark,(
  286.     #(pm,1)
  287.     #(sm,0)
  288.     #(Pgoto-mouse)
  289.     #(sp,{)
  290.     ##(rm,})
  291.     #(sp,0)
  292.     #(pm)
  293. ))
  294. [*]
  295.  
  296.  
  297. Name:P:staydown
  298. [*]#(Pgoto-mouse-window)
  299. #(ds,temp,#(Ptrack-mouse))
  300. #(==,##(temp),Timeout,(
  301.     #(SELF)
  302. ),(
  303.     #(==,##(temp),Left Up,(
  304.         #(..,##(it,1))
  305.         #(rd)
  306.         #(Fmode-line)
  307.         #(ds,temp,##(it,##(P-double-wait)))
  308.         #(==,##(temp),Left Down,(
  309.             #(Pstaydown-do,##(bc,##(rm,>)))
  310.         ),(
  311.             #(Fkbd-in,##(temp))
  312.         ))
  313.     ),(
  314.         #(Fkbd-in,##(temp))
  315.     ))
  316. ))[*]
  317.  
  318.  
  319. Name:Pchar-under-mouse
  320. Return the ASCII value of the character under the mouse.
  321. [*]
  322. #(pm,1)
  323. #(sm,0,.)
  324. #(Fgoto-row-and-column,#(pp))
  325. #(bc,##(rm,>))
  326. #(sp,0)
  327. #(pm)
  328. [*]
  329.  
  330.  
  331. Name:Pgoto-mouse
  332. [*]#(Fgoto-row-and-column,#(pp))[*]
  333.  
  334.  
  335. Name:Pgoto-mouse-window
  336. [*]#(==,##(lv,ow),0,,(
  337.     #(==,##(lv,cw),1,(
  338.         #(g?,#(Pline-on-screen,#(pp)),##(++,##(lv,bl),1),(
  339.             #(ba,##(lv,ow))
  340.             #(sv,cw,2)
  341.             #(Fenter-local-modes)
  342.         ))
  343.     ),(
  344.         #(g?,#(lv,tl),#(Pline-on-screen,#(pp)),(
  345.             #(ba,##(lv,ow))
  346.             #(sv,cw,1)
  347.             #(Fenter-local-modes)
  348.         ))
  349.     ))
  350.  
  351. ))
  352. [*]
  353.  
  354.  
  355. Name:Pinsert-with-mark
  356. Evaluates arg1 and inserts it with a mark around it
  357. [*]
  358. #(pm,2)
  359. #(is,!)
  360. #(sm,0,<)
  361. #(is,arg1)
  362. #(sp,0)
  363. #(dm,>)
  364. #(Fset-new-mark,.)
  365. #(sp,1)
  366. #(pm)
  367. [*]
  368.  
  369.  
  370. Name:Pline-on-screen
  371. [*]##(--,arg2,##(--,##(lv,cl),##(lv,rs)))[*]
  372.  
  373.  
  374. Name:Pmodeline
  375. [*]#(==,#(Pline-on-screen,#(pp)),##(++,##(lv,bl),1),(
  376.     arg1
  377. ),(
  378.     #(==,#(Ffirst,#(pp)),##(lv,rc),(
  379.         arg3
  380.     ),(
  381.         arg2
  382.     ))
  383. ))[*]
  384.  
  385.  
  386. Name:Pmouse-help
  387. Enter with the type of help you wish (modeline,text,scrollbar)
  388. [*]#(ds,temp,##(ls,(,),P.arg1))
  389. #(ow,(
  390. Mouse functions in the arg1 are:
  391. ))
  392. #(ds,temp,##(sa,#(temp)))
  393. #(ds,temp,#(Fmultiple,(SELF-do,arg1),##(temp),SELF))
  394. #(mp,temp,,(,))
  395. #(Fmore)[*]
  396.  
  397.  
  398. Name:Pmouse-help-do
  399. arg1 is the name of the mode.
  400. arg2 is the name of a mouse key.
  401. [*]#(ds,temp,arg2)
  402. #(..,##(fm,temp,-))
  403. #(mp,temp,, Down)
  404. ##(temp)
  405. #(ds,temp,##(arg2))
  406. #(..,##(gn,temp,2))
  407.  ##(temp)
  408. (,)
  409. [*]
  410.  
  411.  
  412. Name:Ppick-match
  413. arg1 = function that evaluates to the left character.
  414. arg2 = function that evaluates to the right character.
  415. copies the braces (the mouse is on the left one)
  416. and everything in between to the point
  417. [*]
  418. #(Pinsert-with-mark,(
  419.     #(pm,5)
  420.     #(sm,0,.)
  421.     #(Pgoto-mouse)
  422.     #(sm,4,.)
  423.     #(sm,3,])
  424.     #(==,#(Ppick-match-do,0,(arg1),(arg2)),YES,(
  425.         ##(rm,4)
  426.     ))
  427.     #(sp,0)
  428.     #(pm)
  429. ))
  430. [*]
  431.  
  432.  
  433. Name:Ppick-match-do
  434. Return YES if we found the matching character between > and 3.
  435. arg1 = depth count.
  436. arg2 = function that evaluates to the left character.
  437. arg3 = function that evaluates to the right character.
  438. [*]
  439. #(lp,arg3)
  440. #(l?,.,3,,1,,(
  441.     #(sm,1,3)
  442. ))
  443. #(lp,arg2)
  444. #(l?,.,3,,2,,(
  445.     #(sm,2,3)
  446. ))
  447. #(g?,##(rc,1),##(rc,2),(
  448.     #(sp,2)
  449.     #(SELF,##(++,arg1,1),(arg2),(arg3))
  450. ),(
  451.     #(sp,1)
  452.     #(==,arg1,1,YES,(
  453.         #(SELF,##(--,arg1,1),(arg2),(arg3))
  454.     ))
  455. ))
  456. [*]
  457.  
  458.  
  459. Name:Ppick-to-end-of-line
  460. Copies the line the mouse is on to the point.
  461. [*]
  462. #(Pinsert-with-mark,(
  463.     #(pm,1)
  464.     #(sm,0,.)
  465.     #(Pgoto-mouse)
  466.     ##(rm,$)
  467.     #(sp,0)
  468.     #(pm)
  469. ))
  470. [*]
  471.  
  472.  
  473. Name:Pregion
  474. Return the first argument if it's in the text region, the second if it's
  475. in the modeline region, and the third if it's in the scrollbar region.
  476. [*]#(==,#(Pline-on-screen,#(pp)),##(++,##(lv,bl),1),(
  477.     arg2
  478. ),(
  479.     #(==,#(Ffirst,#(pp)),79,(
  480.         arg3
  481.     ),(
  482.         arg1
  483.     ))
  484. ))[*]
  485.  
  486.  
  487. Name:Pstaydown-do
  488. [*]#(==,##(pp),##(lv,cs)(,)##(lv,cl),(
  489.     #(n?,staydown-hook,(
  490.         #(staydown-hook,arg1)
  491.     ),(
  492.         #(SELF-do,arg1)
  493.     ))
  494. ),(
  495.     #(P!mouse-left)
  496. ))[*]
  497.  
  498.  
  499. Name:Pstaydown-do-do
  500. [*]#(n?,Pstaydown-do.arg1,(
  501.     #(Pstaydown-do.arg1)
  502. ),(
  503.     #(sp,{)
  504.     #(Pstaydown-mark,})
  505. ))[*]
  506.  
  507.  
  508. Name:Pstaydown-do.123
  509. [*]#(pm,2)
  510. #(==,#(Fforward-find-paren,],{,}),yes,(
  511.     #(sm,1)
  512.     #(sp,0)
  513.     #(Pstaydown-mark,1)
  514. ))
  515. #(pm)[*]
  516.  
  517.  
  518. Name:Pstaydown-do.125
  519. [*]#(pm,2)
  520. #(sp,>)
  521. #(==,#(Fbackward-find-paren,[,{,}),yes,(
  522.     #(sm,1)
  523.     #(sp,0>)
  524.     #(Pstaydown-mark,1)
  525. ))
  526. #(pm)[*]
  527.  
  528.  
  529. Name:Pstaydown-do.13
  530. [*]#(pm,1)
  531. #(sm,0,>)
  532. #(sp,^)
  533. #(Pstaydown-mark,0)
  534. #(pm)[*]
  535.  
  536.  
  537. Name:Pstaydown-do.40
  538. [*]#(pm,2)
  539. #(open-paren-hook)
  540. #(sm,0)
  541. #(==,#(Fforward-find-paren,],(##(bc,40,d,a)),(##(bc,41,d,a))),yes,(
  542.     #(sm,1)
  543.     #(sp,0)
  544.     #(Pstaydown-mark,1)
  545. ))
  546. #(pm)[*]
  547.  
  548.  
  549. Name:Pstaydown-do.41
  550. [*]#(pm,2)
  551. #(sp,>)
  552. #(==,#(Fbackward-find-paren,[,(##(bc,40,d,a)),(##(bc,41,d,a))),yes,(
  553.     #(open-paren-hook)
  554.     #(sm,1)
  555.     #(sp,0>)
  556.     #(Pstaydown-mark,1)
  557. ))
  558. #(pm)[*]
  559.  
  560.  
  561. Name:Pstaydown-do.46
  562. [*]#(pm,1)
  563. #(F:backward-sentence)
  564. #(Pstaydown-mark,0)
  565. #(pm)[*]
  566.  
  567.  
  568. Name:Pstaydown-mark
  569. [*]#(Fset-new-mark,arg1)
  570. #(sv,im,#(Fmark))
  571. #(rd)
  572. #(Fmode-line)
  573. #(ds,temp,#(SELF-do,#(pp)))
  574. #(==,##(temp),Left Up,(
  575.     #(ds,temp,#(g))
  576. ))
  577. #(sv,im,.)
  578. #(rd)
  579. #(Fmode-line)
  580. #(==,##(nc,##(temp)),1,(
  581.     #(F:kill-region)
  582. ),(
  583.     #(Fcase,##(temp),
  584.         (C-q,(#(F:kill-region))),
  585.         (Back Space,(#(F:kill-region)#(ds,temp,Left Up))),
  586.         (Comma,(#(F:kill-region))),
  587.         (LPar,(#(F:kill-region))),
  588.         (RPar,(#(F:kill-region))),
  589.         (foo)
  590.     )
  591. ))
  592. #(Fkbd-in,##(temp))
  593. [*]
  594.  
  595.  
  596. Name:Pstaydown-mark-do
  597. [*]#(ds,temp,##(it,0))
  598. #(==,##(temp),Timeout,(
  599.     #(==,##(pp),(arg1,arg2),(
  600.         #(SELF,arg1,arg2)
  601.     ),(
  602.         #(sm,#(Fmark))
  603.         #(Ptrack-mouse)
  604.     ))
  605. ),(
  606.     ##(it,1)
  607. ))[*]
  608.  
  609.  
  610. Name:Ptrack-mouse
  611. [*]#(rd)
  612. #(Fmode-line)
  613. #(Fgoto-row-and-column,#(pp))
  614. #(==,##(it,0),Timeout,(
  615.     #(SELF)
  616. ),(
  617.     ##(it,1)
  618. ))[*]